$.get("/tags", (data) => {
    console.log(data);
    const arr = [];
    data.forEach(item => {
        if (!arr.includes(item.tag)) {
            arr.push(item.tag)
        }
    });
    arr.forEach(item => {
        const tagElem = $(` <div class="tag"><h2>${item}</h2></div>`)
        $("article").append(tagElem)
        data.forEach(obj => {
            if (obj.tag == item) {
                console.log(obj);
                tagElem.append($(`<h3><a href="./details.html?id=${obj.BLOGID}">${obj.title}</a></h3>`));
            }
        })
    })

})